package cn.qicaiwang.open.app.mapper;

import cn.qicaiwang.open.app.entity.CalculationRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 计算记录Mapper接口
 */
@Mapper
public interface CalculationRecordMapper extends BaseMapper<CalculationRecord> {
    // 继承MyBatis-Plus提供的BaseMapper，包含基本CRUD操作

    /**
     * 根据计算类型查询记录
     * @param calculationType 计算类型
     * @return 计算记录列表
     */
    @Select("SELECT * FROM calculation_records WHERE calculation_type = #{calculationType}")
    List<CalculationRecord> selectByType(@Param("calculationType") String calculationType);
}